#include "ifaceListModel.h"

IfaceListModel::IfaceListModel( QObject *parent ) :ListModel( new IfaceItemModel, parent )
{
}

void IfaceListModel::append( QString &w, QString &t ) {
    //qDebug() << "WordTranslationList::append(" << w << ", " << t << ")\n";
    this->appendRow( new IfaceItemModel(w, t, this) );
}

void IfaceListModel::append( IfaceItemModel *item ) {
    //qDebug() << "WordTranslationList::append(" << w << ", " << t << ")\n";
    this->appendRow( item );
}

void IfaceListModel::remove( int index ) {
    //qDebug() << "WordTranslationList::remove( " << index << " )\n";
    this->removeRow( index );
}

int IfaceListModel::count() {
    return this->rowCount();
}

void IfaceListModel::clearList()
{
    this->clear();
    //this->removeRows( 0, this->count() );
}
